# Replication package - "Survey Quality and Acquiescence Bias: A Cautionary Tale"



## Instructions

Execute the `run.R` R script. This will install the necessary packages, if needed, and then execute the scripts in the `code/` subfolder. Outputs will be created (or overwritten) in the `figures/`, `tables/`, and `proc/` subfolders. 



## Input files

The following files are provided in the replication package:

- `run.R`: Main script to reproduce results.

- `data/`
  + `bovitz/bovitz_qualtrics_results.csv`: Survey responses from original Bovitz study.
  + `bovitz_background_covariates.csv`: Respondent background characteristics from Bovitz.
  + `cint/cint_qualtrics_results.csv`: Survey responses from original Lucid/Cint study.
  + `hr/ag_long.rds`: Replication data from Hill & Roberts (2023; "H&R"). Obtained from their [replication package](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/TVJCTX&version=1.0) (up to script 2, l. 357, i.e., right before the analysis).
  + `hr/question_wordings.csv`: Question wordings from H&R. Coded from their [appendix, Table A3](https://static.cambridge.org/content/id/urn:cambridge.org:id:article:S1047198722000286/resource/name/S1047198722000286sup001.pdf).

- `code/`
  + Scripts 1-3 wrangle the Bovitz, Cint, and H&R data and produce intermediate datasets to `proc/`.
  + Scripts 4-5 produce the article's tables and figures, respectively.
 
 

## Output files

- `run.log`: Logfile.

- `figures/`
  + Includes the following figures in .png format: 1, 2, B1 (A-B), B2 (A-F), B3.
  
- `tables/`
  + Includes the following tables in .tex format: 1, 2, C1, C2, C3.

- `proc/` (intermediate datasets)
  + `bovitz.rds`, `cint.rds`, `hr.rds`.



## Computational details

- OS: Linux (Ubuntu 22.04 LTS). 

- Software: R (4.5.1)

- Packages: `pacman` (0.5.1), `here` (1.0.2), `data.table` (1.17.8), `stringr` (1.5.2), `forcats` (1.0.1), `ggplot2` (4.0.0), `fixest` (0.13.2), `patchwork` (1.3.2) `marginaleffects` (0.30.0), `modelsummary` (2.5.0), `gt` (1.1.0), `tinytable` (0.15.0).

- Execution details: ~20s runtime in laptop, one thread, <250MB Peak RAM usage. 

